package org.soft.carbon_neutral.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

import org.soft.carbon_neutral.entity.Process;
import org.soft.carbon_neutral.mapper.ProcessMapper;
import org.soft.carbon_neutral.service.ProcessService;
import org.soft.carbon_neutral.util.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ProcessServiceImpl extends ServiceImpl<ProcessMapper, Process> implements ProcessService {

    @Autowired
    private ProcessMapper processMapper;

    public R getProcessList() {
        QueryWrapper<Process> wrapper = new QueryWrapper<>();
        List<Process> processes = processMapper.selectList(wrapper);
        return R.success().data("processList",processes);
    }
}
